
#include "CGameApplication.h"
#include "Map.h"

Map::Map(int width, int height, GLfloat x, GLfloat y, GLfloat size)
{
	this->width = width;
	this->height = height;
	pos_x = x;		
	pos_y = y;
	sizeTile = size;

	TilePtr t = TilePtr(new Tile());
	mapTiles.resize(height);
	
	for (int i = 0; i < height; i++)
	{
		mapTiles[i].resize(width);
	}
	
	for (int i = 0; i < height; i++)
	{
		for (int j = 0; j < width; j++)
		{
			mapTiles[i][j] = TilePtr(new Tile());
			mapTiles[i][j]->setHasCollision(false);
			mapTiles[i][j]->setTypeTile(0);
		}
	} 
}